﻿@model List<CSharpDay15__Auth_.Models.UserViewModel>
<br />
<h2>Admin Home</h2>
<table class="table table-bordered">
    <thead>
        <tr>
            <th>Username</th>
            <th>IsDisabled?</th>
            <th>Number of ToDos</th>
            <th>Button</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var u in Model)
        {
            <tr>
                <td>@u.UserName</td>
                <td>@u.IsDisabled</td>
                <td>@u.NumToDos</td>
                <td>@Html.ActionLink("Disable/Reenable", "ToggleDisabledUser", new { id = u.Id }, new { @class = "btn btn-info" })</td>
            </tr>
        }
    </tbody>
</table>